home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
rjs.lha
/
RJS
/
Transport
/
tests
/
dserver.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-14
|
517b
|
32 lines
#include <iostream.h>
#include <stdio.h>
#include <osfcn.h>
#include <libc.h>
#include "RJS/Transport.h"
void test()
{
DECnetSocket server(Socket::Stream),client(Socket::Stream); // create server
DECnetAddress object(140);
object.dump();
cout << object.ss_message() << endl;
server.socket_for_server(object);
server.linger();
server.accept(client); // accept a client
client.linger();
client.write("hello",6); // write to client
sleep(5);
}
int main(int argc, char *argv[])
{
test();
exit(0);
}